<h1><%= @document.title %> (<%= @document.document_state.name -%>)</h1>

  <p>

    <b>Description:</b>
    <%= @document.description %>
  </p>

  <p>
    <b>Body:</b>
    <%= @document.body %>
  </p>

  <p>
    <b>Created at:</b> <%= @document.created_at %></p>

  <p>
    <b>Author:</b>
    <%= User.find(@document.user_id).login %>
  </p>

<div id="document-actions">
<% ["Approve", "Reject", "Promote", "Demote", "Edit", "Delete", "Add a comment"].each do |act| -%>
    <% unless @document_actions[act].nil? -%>
    <%= link_to act, @document_actions[act] -%> |
    <% end -%>
<% end -%>
<%= link_to "Back", @document_actions["Back"] %>
</div>